package cn.net.yato.picture.config.shiro;
 
import org.apache.shiro.authc.HostAuthenticationToken;
import org.apache.shiro.authc.RememberMeAuthenticationToken;

/**
 * @author yato
 */
public class EmailAndVerificationCodeToken implements HostAuthenticationToken, RememberMeAuthenticationToken {
   private String email;
   private boolean rememberMe;
   private String host;

   public EmailAndVerificationCodeToken(String email){
       this(email,false,null);
   }


    public EmailAndVerificationCodeToken(String email, boolean rememberMe){
        this(email,rememberMe,null);
    }

    public EmailAndVerificationCodeToken(String email, boolean rememberMe, String host){
        this.email=email;
        this.rememberMe=rememberMe;
        this.host=host;
    }
    @Override
    public String getHost() {
        return host;
    }

    @Override
    public boolean isRememberMe() {
        return rememberMe;
    }

    @Override
    public Object getPrincipal() {
        return email;
    }

    @Override
    public Object getCredentials() {
        return email;
    }

}